package com.zhl.study.configuration;

import com.zhl.study.service.TransportSelector;
import com.zhl.study.module.Peer;
import com.zhl.study.service.Decoder;
import com.zhl.study.service.Encoder;
import com.zhl.study.service.TransportClient;
import com.zhl.study.service.impl.HTTPTransportClient;
import com.zhl.study.service.impl.JSONDecoder;
import com.zhl.study.service.impl.JSONEncoder;
import com.zhl.study.service.impl.RandomTransportSelector;
import lombok.Data;

import java.util.Arrays;
import java.util.List;

/**
 * @description TODO
 * @Author: z156940l@outlook.com
 * @className RpcClientConfig
 * @Date: 2024/5/20 10:39
 */
@Data
public class RpcClientConfig {

    private Class<? extends TransportClient> transportClass = HTTPTransportClient.class;
    private Class <? extends Encoder> encoderClass = JSONEncoder.class;
    private Class <? extends Decoder> decoderClass = JSONDecoder.class;
    private Class<? extends TransportSelector> selectorClass = RandomTransportSelector.class;

    private int connectCount =1;
    private List<Peer> servers = Arrays.asList(new Peer("127.0.0.1",3002));
}
